<?php $banners = $this->requestAction('/banners/bannertop');?>
<?php

if(count($banners)>0)
{
    $banner= $banners[0];
    if($filetype->getFile($banner['Banner']['filename'])=='swf')
    {
            echo $flash->renderSwf('/files/banners/'.$this->data['Banner']['filename'],728,90);
    }
    else
    {
            if($banner['Banner']['link']=="")
            {
                echo $html->image('/files/banners/'.$banner['Banner']['filename'],array('width'=>728,'height'=>90,'alt'=>$banner['Banner']['nombre_banner'],'title'=>$banner['Banner']['nombre_banner']));
            }
            else
            {
                 echo $html->link( $html->image('/files/banners/'.$banner['Banner']['filename'],array('width'=>728,'height'=>90,'alt'=>$banner['Banner']['nombre_banner'],'title'=>$banner['Banner']['nombre_banner'])),'http://'.$banner['Banner']['link'],array('escape'=>false,'target'=>'_blank','rel'=>'nofollow') );
            }
    }
}
else
{
    echo $html->image('banner_728x90.jpg');
}

     ?>